package com.kwq.designPattern.generate.singleton;

/**
 * @author kangwanqiang
 * @date 2021/2/2
 * @description 饿汉式单例，先加载
 * 缺点：提前加载，浪费资源
 */
public class HungrySingleton {
    private static final HungrySingleton singleton = new HungrySingleton();

    private HungrySingleton(){};
    public static HungrySingleton getInstance(){
        return singleton;
    }
}
